/**
* 描述：用户个人中心
*/
<style lang="scss" scoped>
  @import 'src/styles/vars';
  @import 'src/styles/mixins';
  @import 'src/styles/icons';
  @import 'src/styles/index';
  @import '/index';
  .lyx-form{
    background: #000;
  .el-input__inner{
    background: #ccc;border-radius: 0 !important;
  }
  }
</style>
<template>
  <div>
    <div class="cccShadow"></div>
      <div class="userCenter">
        <div class="l-inner">
          <div class="userCenter-menuList buleShadow radius10">
            <div class="title">我的微职</div>
            <div class="main">
              <a @click="jump(1)" :class="isActive==='/userCenter/resumeCenter'?'cur':''">
                <div class="inner">
                  <i>简历中心</i>
                  <b class="iconUCenter" :class="isActive==='/userCenter/resumeCenter'?'iconUCenter_tipCur':'iconUCenter_tip'"></b>
                  <div class="clear"></div>
                </div>
              </a>
              <a @click="jump(2)" :class="isActive==='/userCenter/whoHasSeen'?'cur':''">
                <div class="inner">
                  <i>谁看过我</i>
                  <b class="iconUCenter" :class="isActive==='/userCenter/whoHasSeen'?'iconUCenter_tipCur':'iconUCenter_tip'"></b>
                  <div class="clear"></div>
                </div>
              </a>
              <a @click="jump(3)" :class="isActive==='/userCenter/myApplication'?'cur':''">
                <div class="inner">
                  <i>我的申请</i>
                  <b class="iconUCenter" :class="isActive==='/userCenter/myApplication'?'iconUCenter_tipCur':'iconUCenter_tip'"></b>
                  <div class="clear"></div>
                </div>
              </a>
              <a @click="jump(4)" :class="isActive==='/userCenter/securityCenter'?'cur':''">
                <div class="inner">
                  <i>安全中心</i>
                  <b class="iconUCenter" :class="isActive==='/userCenter/securityCenter'?'iconUCenter_tipCur':'iconUCenter_tip'"></b>
                  <div class="clear"></div>
                </div>
              </a>
              <a @click="jump(5)" :class="isActive==='/userCenter/personnelLetter'?'cur':''">
                <div class="inner">
                  <i>人事来信</i>
                  <b class="iconUCenter" :class="isActive==='/userCenter/personnelLetter'?'iconUCenter_tipCur':'iconUCenter_tip'"></b>
                  <div class="clear"></div>
                </div>
              </a>
              <a @click="jump(7)" :class="isActive==='/userCenter/systemInfo'?'cur':''">
                <div class="inner">
                  <i>系统消息({{sysInfoList.userSysCount}})</i>
                  <b class="iconUCenter" :class="isActive==='/userCenter/systemInfo'?'iconUCenter_tipCur':'iconUCenter_tip'"></b>
                  <div class="clear"></div>
                </div>
              </a>
              <!--<a @click="jump(7)" :class="isActive==='/userCenter/shieldingCompany'?'cur':''">-->
                <!--<div class="inner">-->
                  <!--<i>屏蔽公司</i>-->
                  <!--<b class="iconUCenter" :class="isActive==='/userCenter/shieldingCompany'?'iconUCenter_tipCur':'iconUCenter_tip'"></b>-->
                  <!--<div class="clear"></div>-->
                <!--</div>-->
              <!--</a>-->
              <!--<a @click="jump(8)" :class="isActive==='/userCenter/calculatingPrice'?'cur':''">-->
                <!--<div class="inner">-->
                  <!--<i>身价计算</i>-->
                  <!--<b class="iconUCenter" :class="isActive==='/userCenter/calculatingPrice'?'iconUCenter_tipCur':'iconUCenter_tip'"></b>-->
                  <!--<div class="clear"></div>-->
                <!--</div>-->
              <!--</a>-->
            </div>
          </div>
          <div class="userCenter-content">
            <div class="main buleShadow radius10">
              <!--<p>开发中ing……</p>-->
              <!--<transition name="slideRight">-->
                <router-view></router-view>
              <!--</transition>-->
            </div>
          </div>
          <div class="clear"></div>
        </div>
      </div>
  </div>
</template>
<script>
  import { mapState, mapActions } from 'vuex';
   export default {
    data () {
      return {};
    },
     computed: {
       ...mapState([
         'sysInfoList'
       ]),
       isActive: function () {
         return this.$route.path;
       }
     },
     async mounted () {
       this.jump(1);
       await this.getSysInfoCount();
     },
    methods: {
      ...mapActions([
        'getSysInfoCount'
      ]),
      jump (val) {
        let url = '';
        switch (val) {
          case 1: // 我的简历
            url = '/userCenter/resumeCenter';
            break;
          case 2: // 谁看过我
            url = '/userCenter/whoHasSeen';
            break;
          case 3: // 我的申请
            url = '/userCenter/myApplication';
            break;
          case 4: // 安全中心
            url = '/userCenter/securityCenter';
            break;
          case 5: // 人事来信
            url = '/userCenter/personnelLetter';
            break;
          case 6: // 更多
            url = '/userCenter/more';
            break;
          case 7: // 计算身价
            url = '/userCenter/systemInfo';
            break;
          // case 7: // 屏蔽公司
          //   url = '/userCenter/shieldingCompany';
          //   break;
          // case 8: // 计算身价
          //   url = '/userCenter/calculatingPrice';
          //   break;
        }
        this.$router.push(url);
      }
    }
  };
</script>
